@import "../core/index-noreset.scss";
@import "scss/variable";
@import "scss/normalize";
@import "scss/mixin";
@import "rtl.scss";

#{$card-prefix} {
    @include box-sizing;

    & {
        min-width: $s-25;
        padding: 0 $card-padding-lr;
        border: $card-border-width $card-border-style $card-border-color;
        border-radius: $card-corner;
        box-shadow: $card-shadow;
        background: $card-background;
    }

    &-head {
        background: $card-header-background;

        &-show-bullet {
            #{$card-prefix}-title {
                padding-left: $card-title-padding-left;
            }

            #{$card-prefix}-title:before {
                content: '';
                display: inline-block;
                height: $card-title-bullet-height;
                width: $card-title-bullet-width;
                background: $card-title-bullet-color;
                position: absolute;
                left: 0;
                top: calc(50% - #{$card-title-bullet-height} / 2);
            }
        }

        &-main {
            position: relative;
            margin-top: $card-head-main-margin-top;
            margin-bottom: $card-head-main-margin-bottom;
            height: $card-head-main-height;
            line-height: $card-head-main-height;
        }
    }

    &-title {
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 80%;
        height: 100%;
        color: $card-title-color;
        font-size: $card-title-font-size;
    }

    &-subtitle {
        font-size: $card-sub-title-font-size;
        color: $card-sub-title-color;
        padding-left: $card-sub-title-padding-left;
    }

    &-extra {
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        font-size: $card-title-extra-font-size;
        color: $card-title-extra-color;
    }

    &-body {
        padding-bottom: $card-body-padding-bottom;
    }

    &-show-divider {
        #{$card-prefix}-head {
            border-bottom: $card-head-bottom-border-width $card-border-style $card-head-bottom-border-color;
        }

        #{$card-prefix}-body {
            padding-top: $card-body-show-divider-padding-top;
        }
    }

    &-hide-divider {
        #{$card-prefix}-body {
            padding-top: $card-body-hide-divider-padding-top;
        }
    }

    &-content {
        overflow: hidden;
        transition: .3s all $ease-out;
        position: relative;
    }

    &-footer {
        .#{$css-prefix}icon {
            transition: .3s all cubic-bezier(.645, .045, .355, 1);

            &.expand {
                transform-origin: 50% 47%;
                transform: rotate(180deg);
            }
        }
    }
}
